import 'dart:async';

import 'package:web_socket_channel/io.dart';

void main() {
  final channel = IOWebSocketChannel.connect('ws://192.168.1.106:8080/hello');
  channel.stream.listen((msg) {
    print(msg.toString());
  });

  Timer.periodic(Duration(seconds: 5), (t) {
    channel.sink.add("hello " + DateTime.now().toIso8601String());
  });
}